import Vue from 'vue'
import App from './App.vue'

// 关闭vue的生产提示
Vue.config.productionTip = false


//region 全局事件总线
const demo = Vue.extend({

})
let demo1 = new demo();
console.log(demo1)
Vue.prototype.x = demo1
//endregion

// 一般起名叫Vue.prototype.$bus

let vm =new Vue({
  render: h => h(App),

  /*render: (createElement) =>{
    console.dir(createElement)
    return createElement("h1", "你好啊")
  }*/
  beforeCreate() {
    // 这样也可以，主要用它的$on $emit $off, 全局事件总线
    Vue.prototype.y = this;
  }

}).$mount('#app')

function $emit(abc, pram) {
  
}
$emit("chengheng", 1)
function chengheng(name) {

}